<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>水库信息批量导入系统</title>
<meta http-equiv="context-type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}

body {
	font-size: 12px;
	font-family: "微软雅黑";
	color: 666;
}

h1 {
	text-align: center;
	line-height: 80px;
	font-size: 24px;
	font-weight: 500;
	line-height: 80px;
	font-size: 24px;
	font-weight: 500
}

.res {
	width: 800px;
	height: 400px;
	margin: 0 auto;
	height: 400px;
}

.res .c_btn {
	width: 100px;
	height: 36px;
	background: #188eee;
	display: block;
	text-align: center;
	line-height: 36px;
	text-decoration: none;
	color: #ffffff;
	font-size: 14px;
	border-radius: 3px;
	margin: 20px 0;
}

.res .c_btn2 {
	width: 100px;
	height: 36px;
	background: #188eee;
	display: block;
	text-align: center;
	line-height: 36px;
	text-decoration: none;
	color: #ffffff;
	font-size: 14px;
	border-radius: 3px;
	margin: 20px 0;
}

.res .c_btn:hover {
	background: #107ed6;
}

.res .c_btn2:hover {
	background: #107ed6;
}

.content {
	width: 800px;
	height: 500px;
	border-top: 1px solid #dfdfdf;
	margin: 0 auto;
	border-bottom: 1px solid #dfdfdf;
}

.content .c_list p {
	line-height: 40px;
	font-size: 14px;
}
</style>
<script type="text/javascript">
   function f_check_form(str){
     var file=str.fileName.value;
      if(file==""){
          alert("请选择要上传的文件!");
          return false;
      }else if(file!="") {
          var arr= new Array();
          arr=file.split(".");
          if(arr.length>1){
             var result=arr[1].substring(0,arr[1].length);
                if("xls"==result || "xlsx"==result){
                  return true;
                  }else{
                   alert("不是标准Execl文件!文件后缀名必须是xls或xlsx");
                      return false;
                      }
                }
      }else{
      return  document.form1.submit();
      }
   }
  
</script>
</head>
<body>
	<h1>JAVA开发水库信息批量导入系统</h1>
	<div class="res">
		<div class="content">
			<div class="c_list">
				<p class="c_rsname">水库名称:短港水库</p>
				<p class="c_rsnamecode">水库名称代码:20170311</p>
				<p class="c_rstype">水库类型:小型</p>
				<p class="c_total_strg_cpct">总库容:1000</p>
				<p class="c_localprovince">水坝所在地_省:湖北省</p>
				<p class="c_localcity">水坝所在地_市:孝感市</p>
				<p class="c_localcounty">水坝所在地_县:应城县</p>
				<p class="c_localtown">水坝所在地_乡:洋河镇</p>
				<p class="c_localvillage">水坝所在地_村:短港村</p>
				<p class="c_localcode">坝址所在地行政区划代码:432401</p>
			</div>
			<form action="execlUpload" name="form1" method="post" 
			enctype="multipart/form-data" onSubmit="return f_check_form(this)">
			<input type="file" id="fileName" name="execlfile">
			 <input type="submit" class="c_btn2" value="上传execl">
		    </form>
		</div>
		

	</div>

</body>
</html>
